function a = position_s_traj_acc(a_value,t_acc,t_ed,t)
    if(t_ed <2*t_acc)
        sprintf("params invalid:acc:t_ed:%.1f <2*t_acc:%.1f",t_ed,t_acc);
        a = 0;
    else    
        if(t>=0 && t < t_acc)
            a = a_value;
        elseif(t>= t_ed-t_acc && t<t_ed)
            a = -a_value;
        else
            a = 0;
        end
    end
end